package org.wotou.authority.system.quartz;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.wotou.authority.domain.scheduleJobDO;

/**
 * 定时任务运行工厂类
 *
 * @author zhangQ
 * @date 2017/11/29
 */
public class QuartzJobFactory implements Job {
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        // System.out.println(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "★★★★★★★★★★★");
        scheduleJobDO scheduleJob = (scheduleJobDO) jobExecutionContext.getMergedJobDataMap().get("scheduleJob");
        ScheduleTask.invokMethod(scheduleJob);
    }
}
